import request from '@/utils/require'
 function classified(){
    return request({
        url: '/rear-end/cat/categories',
        method: 'get'
    })
}
function getfigures(data){
    return request({
        url: '/rear-end/figures',
        method: 'get',
        params:data
    })
}
function getfigures1(data){
    return request({
        url: '/rear-end/figures1',
        method: 'get',
        params:data
    })
}
function gtfigurees2(data){
    return request({
        url: '/rear-end/figures2',
        method: 'get',
        params:data
    })
}
function findidfigure(id){
    return request({
        url:`/rear-end/findidfigure/${id}`,
        method:'get'
    })
}
function pushStore(){
    return request({
        url:"/pushStore",
        method:'get'
    })
}
function morePushStore(){
    return request({
        url:"/morePushStore",
        method:'get'
    })
}
function mySuggestion(data){
    return request({
        url:"/rear-end/mySuggestion",
        method:'get',
        params:data
    })
}
function addShop(data){
    return request({
        url:"/shop/addShop",
        method:'post',
        data
    })
}
function shop(data){
    return request({
        url:"/shop/shopR",
        method:'get',
        params:data
    })
}
function editShop(data){
    return request({
        url:"/shop/editShop",
        method:'put',
        data
    })
}
function delShop(data){
    return request({
        url:"/shop/delShop",
        method:'delete',
        params:data
    })
}
   //获取验证码
function getCode(){
    return request({
        url:"/user/randomCode",
        method:'get'
    })
}
function sign(data){
    return request({
        url:"/user/sign",
        method:'post',
        data
    })
}
function login(data){
    return request({
        url:"/user/login",
        method:'post',
        data
    })
}
function test(){
    return request({
        url:"/user/test",
        method:'get'
    })
}
function editUser(data){
    return request({
        url:"/user/editUser",
        method:'put',
        data
    })
}
function logout(){
    return request({
        url:"/user/logout",
        method:'get'
    })
}
// 设置地址请求
function allAddress(data){
    return request({
        url:"/address/allAddress",
        method:'get',
        params:data
    })
}
function addAddress(data){
    return request({
        url:"/address/addAddress",
        method:'post',
        data
    })
}
function editAddress(data){
    return request({
        url:"/address/editAddress",
        method:'put',
        data
    })
}
function delAddress(data){
    return request({
        url:"/address/delAddress",
        method:'delete',
        params:data
    })
}
function editIsDefault(data){
    return request({
        url:"/address/editIsDefault",
        method:'put',
        data
    })
}
function getGoods(){
    return request({
        url:"/rear-end/getGoods",
        method:'get',
    })
}
export default{
    classified,getfigures,getfigures1,gtfigurees2,findidfigure,
    pushStore,morePushStore,mySuggestion,addShop,shop,
    editShop,delShop,
    getCode,sign,login,test,editUser,logout,
    allAddress,addAddress,editAddress,delAddress,editIsDefault,getGoods
}